package com.gxljc.bear.crawler.itaogao;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator > haitao0928
 * Date: 22-8-4
 * Time: 上午11:35
 * To change this template use File | Settings | File Templates.
 */
public class ItaogaoConst {
	public final static int CRAWL_TIMEOUT = 30000; //爬取timeout时间

	public final static String MONGODB_TMTPOST_TABLE_TAG = "t_tmtpost_tag";
	public final static String MONGODB_TMTPOST_TABLE_PAGE = "t_tmtpost_page";

	public final static String TMTPOST_DOMAIN = "http://www.tmtpost.com/";
	public final static String HBASE_TABLE_PAGE = "gxljc.itaogao.page";
	public final static String HBASE_FAMILY_DATA = "data";
    public final static String IMAGE_HTML_FORMAT = "<img>%s</img>";
    public final static String DETECTOR_WEB_PATH = "getData?id=%s&type=%s&url=%s";

	public static enum SCHEMA_COLUMN_NAME {    //字段内部名
		CRAWL_URL("crawlUrl"), PAGE_SIZE("pageSize"), CRAWL_FLAG("crawlFlag"),
		HTML("html"), TITLE("title");
		private final String value;

		private SCHEMA_COLUMN_NAME(String value) {
			this.value = value;
		}

		public String getValue() {
			return value;
		}
	}

    public static enum NEWSPAPER_SEED {
        JINGJI21("http://epaper.21jingji.com/html/%s/node_1.htm"),
        SOUTHCN("http://epaper.southcn.com/nfdaily/html/%s/node_2.htm"),
        GZDAILY("http://gzdaily.dayoo.com/html/%s/node_1.htm"),
        CBCOMCN("http://dianzibao.cb.com.cn/html/%s/node_%s.htm"),
        MRJJXW("http://www.nbd.com.cn/newspapers/%s/"),
        OEEEE("http://epaper.oeeee.com/epaper/A/html/%s/"),
        CSCOMCN("http://epaper.cs.com.cn/html/%s/node_17.htm");

        private final String value;
        private NEWSPAPER_SEED(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }
    }

    public static enum MONGODB_TABLE { //mongodb 表
        JINGJI21("t_newspaper_21jingji"),
        SOUTHCN("t_newspaper_southcn"),
        CBCOMCN("t_newspaper_cbcomcn"),
        GZDAILY("t_newspaper_gzdaily"),
        MRJJXW("t_newspaper_mrjjxw"),
        CSCOMCN("t_newspaper_cscomcn"),
        OEEEE_SEED("t_newspaper_oeeee_seed"),
        OEEEE_PAGE("t_newspaper_oeeee"),
        CNSTOCK("t_site_cnstock"),
        INFZM("t_site_infzm"),
        CNFOL("t_site_cnfol"),
        GUOCHENGXIN("t_site_guochengxin"),
        YINHANG123("t_site_yinhang123");
        private final String value;
        private MONGODB_TABLE(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }
    }

    public static enum MEDIA_NAME { //mongodb 表
        JINGJI21("二十一世纪经济报道"),
        SOUTHCN("南方日报"),
        CBCOMCN("中国经营报"),
        MRJJXW("每日经济新闻"),
        CSCOMCN("中国证券报");
        private final String value;
        private MEDIA_NAME(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }
    }
}
